Optimal. Leaf size=57 \[ \frac {a \sqrt {-c+d x} \sqrt {c+d x}}{c^2 x}+\frac {2 b \tanh ^{-1}\left (\frac {\sqrt {-c+d x}}{\sqrt {c+d x}}\right )}{d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.05, antiderivative size = 57, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 4, integrand size = 31, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.129, Rules used = {465, 65, 223,
212} \begin {gather*} \frac {a \sqrt {d x-c} \sqrt {c+d x}}{c^2 x}+\frac {2 b \tanh ^{-1}\left (\frac {\sqrt {d x-c}}{\sqrt {c+d x}}\right )}{d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 65
Rule 212
Rule 223
Rule 465
Rubi steps
\begin {align*} \int \frac {a+b x^2}{x^2 \sqrt {-c+d x} \sqrt {c+d x}} \, dx &=\frac {a \sqrt {-c+d x} \sqrt {c+d x}}{c^2 x}+b \int \frac {1}{\sqrt {-c+d x} \sqrt {c+d x}} \, dx\\ &=\frac {a \sqrt {-c+d x} \sqrt {c+d x}}{c^2 x}+\frac {(2 b) \text {Subst}\left (\int \frac {1}{\sqrt {2 c+x^2}} \, dx,x,\sqrt {-c+d x}\right )}{d}\\ &=\frac {a \sqrt {-c+d x} \sqrt {c+d x}}{c^2 x}+\frac {(2 b) \text {Subst}\left (\int \frac {1}{1-x^2} \, dx,x,\frac {\sqrt {-c+d x}}{\sqrt {c+d x}}\right )}{d}\\ &=\frac {a \sqrt {-c+d x} \sqrt {c+d x}}{c^2 x}+\frac {2 b \tanh ^{-1}\left (\frac {\sqrt {-c+d x}}{\sqrt {c+d x}}\right )}{d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.10, size = 57, normalized size = 1.00 \begin {gather*} \frac {a \sqrt {-c+d x} \sqrt {c+d x}}{c^2 x}+\frac {2 b \tanh ^{-1}\left (\frac {\sqrt {-c+d x}}{\sqrt {c+d x}}\right )}{d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [C] Result contains higher order function than in optimal. Order 9 vs. order
3.
time = 0.30, size = 97, normalized size = 1.70
method | result | size |
default | \(\frac {\sqrt {d x -c}\, \sqrt {d x +c}\, \left (\ln \left (\left (\sqrt {d^{2} x^{2}-c^{2}}\, \mathrm {csgn}\left (d \right )+d x \right ) \mathrm {csgn}\left (d \right )\right ) b \,c^{2} x +\sqrt {d^{2} x^{2}-c^{2}}\, \mathrm {csgn}\left (d \right ) d a \right ) \mathrm {csgn}\left (d \right )}{c^{2} \sqrt {d^{2} x^{2}-c^{2}}\, d x}\) | \(97\) |
risch | \(-\frac {a \left (-d x +c \right ) \sqrt {d x +c}}{c^{2} x \sqrt {d x -c}}+\frac {b \ln \left (\frac {d^{2} x}{\sqrt {d^{2}}}+\sqrt {d^{2} x^{2}-c^{2}}\right ) \sqrt {\left (d x -c \right ) \left (d x +c \right )}}{\sqrt {d^{2}}\, \sqrt {d x -c}\, \sqrt {d x +c}}\) | \(98\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.50, size = 55, normalized size = 0.96 \begin {gather*} \frac {b \log \left (2 \, d^{2} x + 2 \, \sqrt {d^{2} x^{2} - c^{2}} d\right )}{d} + \frac {\sqrt {d^{2} x^{2} - c^{2}} a}{c^{2} x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 2.18, size = 68, normalized size = 1.19 \begin {gather*} -\frac {b c^{2} x \log \left (-d x + \sqrt {d x + c} \sqrt {d x - c}\right ) - a d^{2} x - \sqrt {d x + c} \sqrt {d x - c} a d}{c^{2} d x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [C] Result contains complex when optimal does not.
time = 27.99, size = 165, normalized size = 2.89 \begin {gather*} - \frac {a d {G_{6, 6}^{5, 3}\left (\begin {matrix} \frac {5}{4}, \frac {7}{4}, 1 & \frac {3}{2}, \frac {3}{2}, 2 \\1, \frac {5}{4}, \frac {3}{2}, \frac {7}{4}, 2 & 0 \end {matrix} \middle | {\frac {c^{2}}{d^{2} x^{2}}} \right )}}{4 \pi ^{\frac {3}{2}} c^{2}} - \frac {i a d {G_{6, 6}^{2, 6}\left (\begin {matrix} \frac {1}{2}, \frac {3}{4}, 1, \frac {5}{4}, \frac {3}{2}, 1 & \\\frac {3}{4}, \frac {5}{4} & \frac {1}{2}, 1, 1, 0 \end {matrix} \middle | {\frac {c^{2} e^{2 i \pi }}{d^{2} x^{2}}} \right )}}{4 \pi ^{\frac {3}{2}} c^{2}} + \frac {b {G_{6, 6}^{6, 2}\left (\begin {matrix} \frac {1}{4}, \frac {3}{4} & \frac {1}{2}, \frac {1}{2}, 1, 1 \\0, \frac {1}{4}, \frac {1}{2}, \frac {3}{4}, 1, 0 & \end {matrix} \middle | {\frac {c^{2}}{d^{2} x^{2}}} \right )}}{4 \pi ^{\frac {3}{2}} d} - \frac {i b {G_{6, 6}^{2, 6}\left (\begin {matrix} - \frac {1}{2}, - \frac {1}{4}, 0, \frac {1}{4}, \frac {1}{2}, 1 & \\- \frac {1}{4}, \frac {1}{4} & - \frac {1}{2}, 0, 0, 0 \end {matrix} \middle | {\frac {c^{2} e^{2 i \pi }}{d^{2} x^{2}}} \right )}}{4 \pi ^{\frac {3}{2}} d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.67, size = 66, normalized size = 1.16 \begin {gather*} \frac {\frac {16 \, a d^{2}}{{\left (\sqrt {d x + c} - \sqrt {d x - c}\right )}^{4} + 4 \, c^{2}} - b \log \left ({\left (\sqrt {d x + c} - \sqrt {d x - c}\right )}^{4}\right )}{2 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 2.94, size = 77, normalized size = 1.35 \begin {gather*} \frac {4\,b\,\mathrm {atan}\left (\frac {d\,\left (\sqrt {-c}-\sqrt {d\,x-c}\right )}{\sqrt {-d^2}\,\left (\sqrt {c+d\,x}-\sqrt {c}\right )}\right )}{\sqrt {-d^2}}+\frac {a\,\sqrt {c+d\,x}\,\sqrt {d\,x-c}}{c^2\,x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________